#ifndef JTOOLWIDGET_H
#define JTOOLWIDGET_H

#include <QTEGui/qteguiglobal.h>
#include <QFrame>

namespace QTE
{

class JToolWidgetPrivate;

class QTEGUI_EXPORT JToolWidget : public QFrame
{
	Q_OBJECT

public:
	explicit JToolWidget(QWidget *parent);
	~JToolWidget();

public Q_SLOTS:
	void insertItem(int index, const QString &text, QWidget *widget, bool checked = true);
	void addItem(const QString &text, QWidget *widget, bool checked = true);

public Q_SLOTS:
	void removeWidget(QWidget *widget);
	void removeItem(int index);

public Q_SLOTS:
	void setCheckable(bool enable);

public:
	int count() const;

private:
	JToolWidgetPrivate *d_ptr;
};

inline void JToolWidget::addItem(const QString &text, QWidget *widget, bool checked)
{ insertItem(count(), text, widget, checked); }

} //namespace QTE


#endif //JTOOLWIDGET_H
